package com.direction.hold.ui;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.ContentResolver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.content.res.Resources;
import android.content.res.Resources.NotFoundException;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Message;
import android.text.Editable;
import android.text.Selection;
import android.text.SpannableString;
import android.text.TextUtils;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.MenuItem.OnMenuItemClickListener;
import android.view.MotionEvent;
import android.view.SubMenu;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnTouchListener;
import android.view.ViewGroup;
import android.view.Window;
import android.webkit.MimeTypeMap;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import cn.cheln.explorer.actions.OperationManager;
import cn.cheln.explorer.actions.OperationUtil;
import cn.cheln.explorer.actions.sort.ObjectSort;
import cn.cheln.explorer.actions.sort.Sort;
import cn.cheln.explorer.beans.FileInfo;
import cn.cheln.explorer.beans.FileInfoUtil;
import cn.cheln.explorer.beans.FileInfoUtil.FileType;
import cn.cheln.explorer.beans.FileUtil;
import cn.cheln.explorer.beans.ReportInfo;
import cn.cheln.explorer.config.Config;
import cn.cheln.explorer.config.Constants;
import cn.cheln.explorer.config.RuntimeArg;
import cn.cheln.explorer.cpnt.adapter.ColorInterchangedAdapter;
import cn.cheln.explorer.cpnt.adapter.FileAdapter;
import cn.cheln.explorer.cpnt.adapter.FileItemSrc;
import cn.cheln.explorer.cpnt.adapter.PathAdapter;
import cn.cheln.explorer.cpnt.adapter.SelectedIndicator;
import cn.cheln.explorer.cpnt.adapter.ThumbnailAdapter;
import cn.cheln.explorer.ds.MediaArgs;
import cn.cheln.explorer.ds.database.MimeSrc;
import cn.cheln.explorer.ds.database.copersynch.DatasrcDelete;
import cn.cheln.explorer.ds.database.copersynch.DatasrcRename;
import cn.cheln.explorer.ds.sdcard.StrPrefixFilter;
import cn.cheln.explorer.ds.uri.NavigationConstants;
import cn.cheln.explorer.ds.uri.NavigationNode;
import cn.cheln.explorer.ds.uri.NavigationPool;
import cn.cheln.explorer.ds.uri.SDCardNode;
import cn.cheln.explorer.ds.util.ContentValuesUtil;
import cn.cheln.explorer.func.EmptyDirectoryCleaner;
import cn.cheln.explorer.func.setup.InstallHelper;
import cn.cheln.explorer.func.setup.PackageInstallManager;
import cn.cheln.explorer.func.setup.PackageInstallService;
import cn.cheln.explorer.func.setup.ReportOfInstall;
import cn.cheln.explorer.ui.HighLightListener;
import cn.cheln.explorer.ui.ViewHolder;
import cn.cheln.explorer.ui.ViewUtil;
import cn.cheln.support.data.text.xml.SPUtil;
import cn.cheln.support.dialog.CancelClicker;
import cn.cheln.support.images.FileTypeInfo;
import cn.cheln.support.inputmethod.InputMethodUtil;
import cn.cheln.support.log.Logs;
import cn.cheln.support.manager.ActivityPool;
import cn.cheln.support.mobile.media.RingtoneUtil;
import cn.cheln.support.mobile.sdcard.SDcardChecker;
import cn.cheln.support.notification.NotifyUtil;
import cn.cheln.support.ui.DensityUtil;
import cn.cheln.support.ui.adapter.ItemDataSrc;
import cn.cheln.support.ui.adapter.ListenerBox;
import cn.cheln.support.ui.adapter.MapAdapter;
import cn.cheln.support.ui.adapter.MapAdapter.ActionListener;
import cn.cheln.support.ui.adapter.MapAdapter.AdaptInfo;
import com.direction.hold.FileApp;
import com.umeng.fb.UMFeedbackService;
import java.io.File;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Stack;

public abstract class CommonActivity extends Activity
  implements View.OnClickListener, MenuItem.OnMenuItemClickListener
{
  public static final int ACCESS_HANDLER = 1;
  public static final int ACCESS_ORIGINAL = 0;
  public static final String COUNT_INVOKED = "com.lewa.filemgr.count_start";
  protected static final int DIALOG_CLEAN_DIR = 6;
  protected static final int DIALOG_DELETE = 3;
  protected static final int DIALOG_FILEINFO = 5;
  public static final int DIALOG_INSTALL_REPORT = 9;
  protected static final int DIALOG_MY_PIC_SIZE = 7;
  protected static final int DIALOG_NEW_FOLDER = 1;
  protected static final int DIALOG_PREFER_INSTALL = 8;
  protected static final int DIALOG_RENAME = 4;
  public static final String INTF_DATA_FOR_FEEDBACK = "PATHS";
  protected static final String LIMIT_WORD = "LIMIT_WORD";
  protected static final int MEMU_GROUP_TITLEBTN = 15;
  protected static final int MEMU_MOVEINTO_PRIVACY = 16;
  protected static final int MENU_APK = 34;
  protected static final int MENU_CLEAN = 22;
  protected static final int MENU_CLOCK = 19;
  protected static final int MENU_COMINGCALL = 21;
  protected static final int MENU_COPY = 11;
  protected static final int MENU_DEFAULT = 35;
  protected static final int MENU_DELETE = 6;
  protected static final int MENU_FILEINFO = 12;
  protected static final int MENU_INSTALL = 17;
  protected static final int MENU_JUMP = 36;
  protected static final int MENU_MORE_SEND = 28;
  protected static final int MENU_MOVE = 10;
  protected static final int MENU_MUSIC = 31;
  protected static final int MENU_MY_PIC_SIZE = 24;
  protected static final int MENU_OPEN_OTHER_WAY = 29;
  protected static final int MENU_PATH_OFFSET = 100;
  protected static final int MENU_PICTURE = 30;
  protected static final int MENU_PREFER_MEMORY = 26;
  protected static final int MENU_PREFER_SDCARD = 25;
  protected static final int MENU_PREFER_SYSTEM = 27;
  protected static final int MENU_REFRESH = 13;
  protected static final int MENU_RENAME = 7;
  protected static final int MENU_RINGTONESET = 18;
  protected static final int MENU_SEND = 8;
  protected static final int MENU_SHOW_HIDDEN = 23;
  protected static final int MENU_SMS = 20;
  protected static final int MENU_TEXT = 33;
  protected static final int MENU_VIDEO = 32;
  public static final int MODE_CURR = 2;
  public static final int MODE_HISTORY = 1;
  public static final int MODE_NEW = 0;
  public static final int OPTION_UI_BOTTOM_BAR = 0;
  protected static final String SELEC_TMODE = "SELECT_MODE";
  public int accessFlag;
  public String action_flag;
  protected MapAdapter.AdaptInfo adaptInfo;
  public FileAdapter adapter;
  protected Button back;
  protected View bottomToolbar;
  public Button button;
  protected String callbackAction;
  public View contentView;
  public CommonActivity context;
  protected View contextMenuView;
  public Dialog dialog;
  public View feedback_confirm_dialog;
  public ListView fileListView;
  public List<FileInfo> filesInfo;
  public GridView gridview;
  public Handler handler = new Handler()
  {
    public void handleMessage(Message paramMessage)
    {
      super.handleMessage(paramMessage);
      switch (paramMessage.what)
      {
      case 3:
      case 8:
      case 10:
      case 15:
      case 17:
      default:
      case 0:
      case 1:
      case 6:
      case 7:
      case 2:
      case 4:
      case 18:
      case 5:
      case 9:
      case 11:
      case 12:
      case 13:
        PathActivity.ReadRuntime localReadRuntime;
        do
        {
          do
          {
            return;
            updateOperation(paramMessage);
            return;
            ((ThumbnailAdapter)CommonActivity.this.listview.getAdapter()).notifyDataSetChanged();
            return;
            CommonActivity.this.adapter.notifyDataSetChanged();
            return;
            CommonActivity.this.selectTextImageChange();
            return;
            handlerLocate(paramMessage.arg1);
            return;
            CommonActivity.this.sort();
            handlerLocate(CommonActivity.this.adapter.getPathOnlyItemPos((FileInfo)paramMessage.obj));
            CommonActivity.this.renameWaitDialog.cancel();
            return;
            ActivityPool.getInstance().sortrefresh();
            return;
            CommonActivity.this.adapter.notifyDataSetChanged();
            CommonActivity.this.showDialog(6);
            CommonActivity.this.refresh();
            return;
            CommonActivity.this.adapter.notifyDataSetChanged();
            return;
          }
          while (PathActivity.activityInstance == null);
          PathActivity.activityInstance.firstTimeStartup(0, false, 0);
          return;
          localReadRuntime = (PathActivity.ReadRuntime)paramMessage.obj;
        }
        while (PathActivity.activityInstance == null);
        PathActivity.activityInstance.refreshSDcardReadView(localReadRuntime.status, localReadRuntime.navNode, localReadRuntime.listviewPos, localReadRuntime.readMode);
        return;
      case 14:
        CommonActivity.this.showDialog(9);
        return;
      case 16:
      }
      LayoutInflater.from(CommonActivity.this.getContext()).inflate(2130903047, null).findViewById(2131230771).setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramView)
        {
          try
          {
            CommonActivity.this.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("market://details?id=com.lewa.app.filemanager")));
            return;
          }
          catch (Exception localException)
          {
            Intent localIntent = new Intent();
            localIntent.setAction("shortcut.intent.action.VIEW");
            localIntent.setData(Uri.parse("http://zhushou.360.cn/detail/index/soft_id/178592"));
            CommonActivity.this.startActivity(localIntent);
          }
        }
      });
    }

    public void handlerLocate(int paramInt)
    {
      while (true)
      {
        if (CommonActivity.this.listview.getSelectedItemPosition() == paramInt)
          return;
        CommonActivity.this.listview.setSelection(paramInt);
        if (CommonActivity.this.listview.isFocused())
          CommonActivity.this.listview.clearFocus();
        CommonActivity.this.listview.requestFocusFromTouch();
      }
    }

    public void updateOperation(Message paramMessage)
    {
      MimeSrc.recountCategoryNum(CommonActivity.this.context);
      OperationUtil.mOperationState = Integer.valueOf(2);
      CommonActivity.this.operationUtil.duplicated.clear();
      CommonActivity.this.operationUtil.pasteOperEntities.clear();
      OperationManager.clearMarks();
      CommonActivity.this.makeSeenToAll(true);
      CommonActivity.this.showBottomBar(8);
      CommonActivity.this.adapter.notifyDataSetChanged();
      CommonActivity.this.listview.requestLayout();
      CommonActivity.this.listview.invalidate();
      CommonActivity.this.refresh();
      ActivityPool.getInstance().refresh(CommonActivity.this.context);
      Dialog localDialog = (Dialog)paramMessage.obj;
      if (localDialog == null)
        return;
      localDialog.dismiss();
      localDialog.cancel();
    }
  };
  boolean hasSelection;
  public Map<String, ViewHolder> holderMap = new HashMap();
  public Dialog installDialog;
  protected Boolean isChoiceModeMultiple = null;
  boolean isHiddenFileShow;
  TextView key_album;
  TextView key_artist;
  protected List<Integer> largeSizePics = new ArrayList();
  protected String limitWord;
  protected View list;
  AdapterView.OnItemClickListener listItemClickListener;
  public ListView listview;
  protected LinearLayout mEmptyLayout;
  protected Integer mState = OperationUtil.mOperationState;
  protected boolean mStateCheckBoxVisible = true;
  protected List<MenuItem> menuItems = new ArrayList();
  protected ViewGroup menuKeyView = null;
  protected String mimetype;
  public NavigationPool navTool = new NavigationPool();
  public NavigationNode navigation;
  public int newPos;
  protected FileInfo operatedfile;
  protected AlertDialog operatingDialog;
  protected OperationUtil operationUtil;
  protected View pasteBar_cancel;
  protected View pasteBar_paste;
  protected View pasteToolbar;
  public Sort policy;
  protected List<FileInfo> pwdDir;
  public ProgressDialog renameWaitDialog;
  MapAdapter.AdaptInfo reportAdaptInfo;
  private MapAdapter reportAdapter;
  TextView reportTitleView;
  protected Button sdcardPathBtn;
  private Drawable selector;
  private boolean selectwhole;
  private boolean singleClick;
  public int status = -1;
  public View stub;
  ContextMenu thismenu;
  ContextMenu.ContextMenuInfo thismenuInfo;
  protected View toolbar_cancel;
  protected View toolbar_copy;
  protected View toolbar_cut;
  protected View toolbar_del;
  protected View toolbar_selectAll;
  View.OnTouchListener touchEffectListner;
  TextView value_album;
  TextView value_artist;
  protected MapAdapter.ActionListener[] viewHandlers;

  public CommonActivity()
  {
    MapAdapter.ActionListener[] arrayOfActionListener = new MapAdapter.ActionListener[1];
    arrayOfActionListener[0] = new MapAdapter.ActionListener(2131230801, 0)
    {
      public void handle(View paramView, ListenerBox paramListenerBox)
      {
        Integer localInteger;
        FileInfo localFileInfo;
        Boolean localBoolean;
        ThumbnailAdapter localThumbnailAdapter = (ThumbnailAdapter)paramListenerBox.getBaseAdapter();
        View localView = ViewUtil.findListViewByItemView(paramView);
        if (localView == null);
        do
        {
          boolean bool1;
          do
          {
            do
            {
              return;
              ((ListView)localView.getParent());
              localInteger = (Integer)localThumbnailAdapter.getViewContentMap().get(localView);
            }
            while (localInteger == null);
            bool1 = ((CheckBox)paramView).isChecked();
            localFileInfo = (FileInfo)localThumbnailAdapter.getItem(localInteger.intValue());
          }
          while (localFileInfo == null);
          localBoolean = CommonActivity.this.singleChoiceInsertion(paramView, localInteger, localFileInfo, bool1);
        }
        while (localBoolean == null);
        boolean bool2 = ((CheckBox)paramView).isChecked();
        localThumbnailAdapter.addSelected(localInteger.intValue(), bool2);
        if (bool2)
          CommonActivity.this.operationUtil.addOperationTarget(localFileInfo);
        while (true)
        {
          CommonActivity.this.showBackBar();
          if ((localBoolean == null) || (localBoolean.booleanValue()));
          CommonActivity.this.treatBottmBar(localThumbnailAdapter);
          CommonActivity.this.handler.sendEmptyMessage(2);
          Logs.i("", "i ============== " + localFileInfo.path + " " + CommonActivity.this.operationUtil.getOperationTargets().size() + " " + bool2);
          return;
          CommonActivity.this.operationUtil.removeOperationTarget(localFileInfo);
        }
      }
    };
    this.viewHandlers = arrayOfActionListener;
    this.listItemClickListener = new ListItemClickListener();
    this.touchEffectListner = new HighLightListener();
  }

  private void initDialogs()
  {
    if (this.renameWaitDialog != null)
      return;
    this.renameWaitDialog = new ProgressDialog(this);
    this.renameWaitDialog.setMessage(this.context.getString(2131034238));
    this.renameWaitDialog.setCancelable(false);
    this.renameWaitDialog.setIndeterminate(true);
  }

  private void initListViewSelector()
    throws Resources.NotFoundException
  {
    if (this.selector != null)
      return;
    this.selector = getResources().getDrawable(2130837509);
  }

  public static void refreshCountActivity()
  {
    CountActivity.categoryActivity.status = 2;
    CountActivity.categoryActivity.refresh();
  }

  public abstract void access(NavigationNode paramNavigationNode, int paramInt1, boolean paramBoolean, int paramInt2, int paramInt3);

  protected abstract void access(NavigationNode paramNavigationNode, int paramInt1, boolean paramBoolean, int paramInt2, int paramInt3, int paramInt4);

  protected void addAllItemToOperationUtil(boolean paramBoolean)
  {
    Object localObject;
    if (!(paramBoolean))
      ((MapAdapter)this.listview.getAdapter()).getSelected().clear();
    do
    {
      return;
      localObject = null;
    }
    while (this.listview.getAdapter() == null);
    Logs.i("", "=========<> " + this.adapter.getCount());
    int i = 0;
    while (true)
    {
      if (i < this.adapter.getCount());
      try
      {
        FileInfo localFileInfo = this.adapter.getSimpleFileItem(i);
        localObject = localFileInfo;
        if (paramBoolean)
          label90: this.operationUtil.addOperationTarget(localObject);
        ++i;
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
        break label90:
      }
    }
  }

  public void addContextMenus(ContextMenu paramContextMenu)
  {
    if ((super.getClass() != PathActivity.class) && (!(this.operatedfile.getIsDir().booleanValue())))
      paramContextMenu.add(0, 36, 0, 2131034141);
    paramContextMenu.add(0, 12, 0, 2131034140);
    if (!(this.operatedfile.getIsDir().booleanValue()))
      addWayOpenMenu(paramContextMenu.addSubMenu(2131034302));
    if (super.getClass() != SearchActivity.class)
      paramContextMenu.add(0, 7, 0, 2131034135);
    this.operatedfile.buildFile();
    String str = FileTypeInfo.getTypeInfo(this.operatedfile).mime;
    if ((str != null) && (str.toUpperCase().startsWith("AUDIO")))
    {
      SubMenu localSubMenu = paramContextMenu.addSubMenu(2131034245);
      localSubMenu.add(18, 19, 0, 2131034242);
      localSubMenu.add(18, 20, 0, 2131034243);
      localSubMenu.add(18, 21, 0, 2131034244);
    }
    paramContextMenu.add(0, 10, 0, 2131034138);
    paramContextMenu.add(0, 11, 0, 2131034139);
    paramContextMenu.add(0, 8, 0, 2131034136);
    paramContextMenu.add(0, 6, 0, 2131034134);
  }

  public void addWayOpenMenu(Menu paramMenu)
  {
    paramMenu.add(29, 30, 0, getString(2131034155));
    paramMenu.add(29, 31, 0, getString(2131034153));
    paramMenu.add(29, 32, 0, getString(2131034154));
    paramMenu.add(29, 33, 0, getString(2131034303));
    paramMenu.add(29, 34, 0, getString(2131034157));
    paramMenu.add(29, 35, 0, getString(2131034304));
  }

  protected boolean backward()
  {
    Logs.i("------------ 111 ");
    if (!(this.navTool.isAtTop()))
    {
      this.navTool.navEntity.pop();
      Logs.i("------------ 222 ");
      this.sdcardPathBtn.setText(((NavigationNode)this.navTool.navEntity.peek()).displayname.replaceAll("/", " / "));
      access((NavigationNode)this.navTool.navEntity.peek(), ((NavigationNode)this.navTool.navEntity.peek()).defaultPosition, true, 1, OperationUtil.mOperationState.intValue());
      return true;
    }
    return false;
  }

  public void buildAdapter(Class<? extends MapAdapter> paramClass, MapAdapter.AdaptInfo paramAdaptInfo)
  {
    constructAdapter(paramClass, paramAdaptInfo);
    this.listview = ((ListView)findViewById(2131230811));
    this.listview.setCacheColorHint(0);
    setEmptyView(this.listview);
    this.listview.setOnCreateContextMenuListener(this);
    if (getOnClickListener() == null)
      return;
    this.listview.setOnItemClickListener(getOnClickListener());
  }

  public View buildList()
  {
    return LayoutInflater.from(this).inflate(2130903058, null);
  }

  protected void clearSelectWithUIOption(int paramInt)
  {
    clearUISelect();
    if ((paramInt != 0) || (!(this.bottomToolbar.isShown())))
      return;
    showBottomBar(8);
  }

  public void clearUISelect()
  {
    if (this.listview.getAdapter() == null)
      return;
    ((ThumbnailAdapter)this.listview.getAdapter()).clearSelectOption();
    this.listview.requestLayout();
    OperationUtil.dataClear();
    OperationUtil.dataClear();
  }

  public void constructAdapter(Class<? extends MapAdapter> paramClass)
  {
    try
    {
      this.adapter = ((FileAdapter)paramClass.getConstructor(new Class[] { Context.class }).newInstance(new Object[] { this }));
      return;
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }

  public void constructAdapter(Class<? extends MapAdapter> paramClass, MapAdapter.AdaptInfo paramAdaptInfo)
  {
    try
    {
      this.adapter = ((FileAdapter)paramClass.getConstructor(new Class[] { Context.class, MapAdapter.AdaptInfo.class }).newInstance(new Object[] { this, paramAdaptInfo }));
      return;
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }

  public boolean createBrowseView(MapAdapter.ActionListener[] paramArrayOfActionListener, AdapterView.OnItemClickListener paramOnItemClickListener, boolean paramBoolean)
  {
    if (this.list == null)
    {
      View localView = buildList();
      this.list = localView;
      this.contentView = localView;
      Logs.i("", "11 #--" + this.contentView);
      setContentView(this.contentView);
      initNavBar();
      initListView(PathAdapter.class);
      initBottomBar();
      initInvokedVar(getIntent());
      this.listview.setAdapter(this.adapter);
      return paramBoolean;
    }
    if (this.contentView != this.list)
    {
      this.contentView = this.list;
      setContentView(this.contentView);
    }
    return true;
  }

  protected File createNewFolder(String paramString)
  {
    if (!(TextUtils.isEmpty(paramString)))
    {
      String str = paramString.trim();
      if (this.navTool.navEntity.isEmpty())
        return null;
      File localFile = FileUtil.getFile(((FileInfo)((NavigationNode)this.navTool.navEntity.peek()).producingSource).getFile(), str);
      if (localFile.mkdirs())
      {
        refresh();
        return localFile;
      }
    }
    return null;
  }

  public Dialog createReportDialog(CancelClicker paramCancelClicker)
  {
    View localView = LayoutInflater.from(this).inflate(2130903045, null);
    return new AlertDialog.Builder(this).setTitle(2131034218).setView(localView).setCancelable(false).setNeutralButton(2131034264, paramCancelClicker).create();
  }

  protected abstract void cutOrCopy(int paramInt);

  public void doAfterInstall()
  {
    if (this.installDialog.isShowing())
    {
      this.installDialog.cancel();
      this.installDialog.dismiss();
    }
    makeSelectAll(false, true);
    showBottomBar(8);
  }

  public void doInstall()
  {
    PackageInstallManager.toInstallPaths = OperationUtil.toListPath(this.context);
    getApplicationContext().startService(new Intent(getApplicationContext(), PackageInstallService.class));
    doAfterInstall();
  }

  public void enterDir(FileInfo paramFileInfo)
  {
    if (paramFileInfo.isDir.booleanValue())
    {
      if (!(paramFileInfo.isForceDir()))
        break label40;
      Toast.makeText(getContext(), 2131034295, 1).show();
      DatasrcDelete.recursiveUpdateDel(paramFileInfo, this.context);
    }
    return;
    label40: Integer localInteger = (Integer)((MapAdapter)this.listview.getAdapter()).getViewContentMap().get(this.listview.getChildAt(0));
    access(new SDCardNode(paramFileInfo), localInteger.intValue(), true, 0, OperationUtil.mOperationState.intValue());
  }

  protected void fileListContextMenux(ContextMenu paramContextMenu, ContextMenu.ContextMenuInfo paramContextMenuInfo)
  {
    try
    {
      AdapterView.AdapterContextMenuInfo localAdapterContextMenuInfo = (AdapterView.AdapterContextMenuInfo)paramContextMenuInfo;
      FileInfo localFileInfo = (FileInfo)this.adapter.getItem(localAdapterContextMenuInfo.position);
      localFileInfo.buildFile();
      paramContextMenu.setHeaderTitle(localFileInfo.getName());
      if (localFileInfo.getIconRes() instanceof Drawable)
        paramContextMenu.setHeaderIcon((Drawable)localFileInfo.getIconRes());
      this.operatedfile = localFileInfo;
      if (this.singleClick)
      {
        addWayOpenMenu(paramContextMenu);
        return;
      }
    }
    catch (ClassCastException localClassCastException)
    {
      return;
    }
    addContextMenus(paramContextMenu);
  }

  public void finish()
  {
    ActivityPool.getInstance().rmActivity(this);
    super.finish();
  }

  public MapAdapter.AdaptInfo getAdaptInfo()
  {
    if (this.adaptInfo == null)
    {
      this.adaptInfo = new MapAdapter.AdaptInfo();
      this.adaptInfo.objectFields = new String[] { "sizeText", "name", "lastModified", "countStr", "iconRes", "isUISelected" };
      this.adaptInfo.listviewItemData = new FileItemSrc();
      this.adaptInfo.viewIds = new int[] { 2131230806, 2131230803, 2131230805, 2131230804, 2131230800, 2131230801 };
      this.adaptInfo.listviewItemLayoutId = 2130903053;
      this.adaptInfo.actionListeners = getViewHandlers();
    }
    return this.adaptInfo;
  }

  public ThumbnailAdapter getAdapter()
  {
    return this.adapter;
  }

  public MapAdapter.AdaptInfo getCleanAdaptInfo()
  {
    if (this.reportAdaptInfo == null)
    {
      this.reportAdaptInfo = new MapAdapter.AdaptInfo();
      this.reportAdaptInfo.objectFields = new String[] { "firstline_name", "secondline_detail" };
      this.reportAdaptInfo.listviewItemData = new FileItemSrc();
      this.reportAdaptInfo.viewIds = new int[] { 2131230767, 2131230768 };
      this.reportAdaptInfo.listviewItemLayoutId = 2130903046;
    }
    return this.reportAdaptInfo;
  }

  protected Context getContext()
  {
    return this;
  }

  protected abstract String getEmptyText();

  public View getEmptyView()
  {
    return findViewById(2131230846);
  }

  public abstract int[] getMenuIds();

  public abstract String getNavBarWholeShowText();

  public AdapterView.OnItemClickListener getOnClickListener()
  {
    return this.listItemClickListener;
  }

  public View getPageView()
  {
    return this.list;
  }

  public String getSDcardPath()
  {
    return NavigationConstants.SDCARD_PATH;
  }

  public MapAdapter.ActionListener[] getViewHandlers()
  {
    return this.viewHandlers;
  }

  public abstract void gotoCat();

  public abstract void handlerRead(Object paramObject, boolean paramBoolean);

  public boolean hasToOperatingOption()
  {
    boolean bool1 = true;
    StringBuilder localStringBuilder = new StringBuilder("=== operationSrc.size()==0 ");
    if (OperationUtil.selectedEntities.size() == 0);
    for (boolean bool2 = bool1; ; bool2 = false)
    {
      Logs.i("", bool2 + " operationSrc.isEmpty() " + OperationUtil.selectedEntities.isEmpty());
      if ((OperationUtil.selectedEntities.size() == 0) || (OperationUtil.selectedEntities.isEmpty()))
        bool1 = false;
      return bool1;
    }
  }

  public void hideMusicMenu(Menu paramMenu, boolean paramBoolean)
  {
  }

  public void initBottomBar()
  {
    this.bottomToolbar = findViewById(2131230821);
    this.toolbar_cut = this.bottomToolbar.findViewById(2131230826);
    this.toolbar_copy = this.bottomToolbar.findViewById(2131230824);
    this.toolbar_del = this.bottomToolbar.findViewById(2131230822);
    this.toolbar_cancel = this.bottomToolbar.findViewById(2131230829);
    this.toolbar_selectAll = this.bottomToolbar.findViewById(2131230831);
    this.toolbar_cut.setOnClickListener(this);
    this.toolbar_copy.setOnClickListener(this);
    this.toolbar_del.setOnClickListener(this);
    this.toolbar_cancel.setOnClickListener(this);
    this.toolbar_selectAll.setOnClickListener(this);
    this.toolbar_cut.setOnTouchListener(this.touchEffectListner);
    this.toolbar_copy.setOnTouchListener(this.touchEffectListner);
    this.toolbar_del.setOnTouchListener(this.touchEffectListner);
    this.toolbar_cancel.setOnTouchListener(this.touchEffectListner);
    this.toolbar_selectAll.setOnTouchListener(this.touchEffectListner);
    this.pasteToolbar = findViewById(2131230813);
    this.pasteBar_paste = this.pasteToolbar.findViewById(2131230814);
    this.pasteBar_cancel = this.pasteToolbar.findViewById(2131230816);
    this.pasteBar_paste.setOnClickListener(this);
    this.pasteBar_cancel.setOnClickListener(this);
    this.pasteBar_paste.setOnTouchListener(this.touchEffectListner);
    this.pasteBar_cancel.setOnTouchListener(this.touchEffectListner);
    findViewById(2131230835).setOnCreateContextMenuListener(this);
    findViewById(2131230835).setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramView)
      {
        CommonActivity.this.openContextMenu(paramView);
      }
    });
    findViewById(2131230835).setOnTouchListener(this.touchEffectListner);
  }

  public void initInvokedVar(Intent paramIntent)
  {
    if (paramIntent == null);
    for (String str = null; ; str = paramIntent.getAction())
    {
      this.action_flag = str;
      if ((this.action_flag != null) && (this.action_flag.trim().equals("com.lewa.filemgr.path_start")))
        break;
      return;
    }
    this.isChoiceModeMultiple = Boolean.valueOf(paramIntent.getBooleanExtra("SELECT_MODE", false));
    this.callbackAction = paramIntent.getStringExtra("CALLBACK_ACTION");
  }

  public void initListView(Class<? extends MapAdapter> paramClass)
  {
    getAdaptInfo();
    buildAdapter(paramClass, this.adaptInfo);
  }

  public void initNavBar()
  {
    this.sdcardPathBtn = ((Button)findViewById(2131230852));
    this.sdcardPathBtn.setOnCreateContextMenuListener(this);
    this.sdcardPathBtn.setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramView)
      {
        CommonActivity.this.openContextMenu(paramView);
      }
    });
    this.sdcardPathBtn.setOnTouchListener(new View.OnTouchListener()
    {
      String text = null;

      public boolean onTouch(View paramView, MotionEvent paramMotionEvent)
      {
        int i;
        if (paramView.isPressed())
        {
          i = 2130837528;
          label10: paramView.setBackgroundResource(i);
          switch (paramMotionEvent.getAction())
          {
          default:
          case 0:
          case 2:
          case 1:
          case 3:
          case 4:
          }
        }
        while (true)
        {
          reserveText(paramView);
          return true;
          i = 2130837512;
          break label10:
          paramView.setBackgroundResource(2130837528);
          continue;
          paramView.setBackgroundResource(2130837512);
          CommonActivity.this.openContextMenu(paramView);
        }
      }

      public void reserveText(View paramView)
      {
        this.text = ((TextView)paramView).getText().toString();
        paramView.setPadding(DensityUtil.dip2px(CommonActivity.this.context, 8.0F), paramView.getPaddingTop(), paramView.getPaddingRight(), paramView.getPaddingBottom());
        ((TextView)paramView).setText(this.text);
        paramView.requestLayout();
        paramView.invalidate();
      }
    });
  }

  public void initOperation()
  {
    this.operationUtil = new OperationUtil();
    OperationManager.operationMap.put(this.operationUtil, this);
    OperationUtil.mOperationState = Integer.valueOf(2);
  }

  public boolean isChildRelation(File paramFile, List<String> paramList)
  {
    if (paramFile.getAbsolutePath().equals(NavigationConstants.SDCARD_PATH))
      return false;
    File localFile = paramFile;
    do
    {
      if ((paramList.contains(localFile.getParentFile().getAbsolutePath())) || (paramList.contains(localFile.getAbsolutePath())))
        return true;
      localFile = localFile.getParentFile();
    }
    while (!(localFile.getAbsolutePath().equals(NavigationConstants.SDCARD_PATH)));
    return false;
  }

  public boolean isHiddenFileShow()
  {
    return this.isHiddenFileShow;
  }

  public boolean isInListDetail()
  {
    return true;
  }

  public boolean isMediaNav()
  {
    return ((((NavigationNode)this.navTool.navEntity.peek()).producingSource.equals("image")) || (((NavigationNode)this.navTool.navEntity.peek()).producingSource.equals("audio")) || (((NavigationNode)this.navTool.navEntity.peek()).producingSource.equals("video")));
  }

  public boolean isSelectwhole()
  {
    return this.selectwhole;
  }

  public ViewHolder loadViewHolder(String paramString, ViewHolder paramViewHolder)
  {
    if (!(this.holderMap.containsKey(paramString)))
    {
      Logs.i("class -- " + paramString);
      this.holderMap.put(paramString, paramViewHolder);
    }
    return ((ViewHolder)this.holderMap.get(paramString));
  }

  public void makeSeenToAll(boolean paramBoolean)
  {
    int i;
    if (this.adapter != null)
    {
      this.adapter.markVisible(paramBoolean);
      i = 0;
      label17: if (i < this.listview.getChildCount())
        break label36;
      this.adapter.notifyDataSetChanged();
    }
    return;
    label36: CheckBox localCheckBox = (CheckBox)ViewUtil.findViewById(this.listview.getChildAt(i), 2131230801);
    if (localCheckBox != null)
      if (!(paramBoolean))
        break label76;
    for (int j = 0; ; j = 8)
    {
      localCheckBox.setVisibility(j);
      ++i;
      label76: break label17:
    }
  }

  public void makeSelectAll(boolean paramBoolean1, boolean paramBoolean2)
  {
    makeSelectAll(paramBoolean1, paramBoolean2, null, null);
  }

  public void makeSelectAll(boolean paramBoolean1, boolean paramBoolean2, CheckBox paramCheckBox, Integer paramInteger)
  {
    this.selectwhole = true;
    int i = 0;
    if (i >= this.listview.getChildCount())
    {
      if (this.listview.getAdapter() != null)
        label8: ((ThumbnailAdapter)this.listview.getAdapter()).selectAll(paramBoolean1);
      if (paramBoolean2)
        addAllItemToOperationUtil(paramBoolean1);
      this.selectwhole = false;
      return;
    }
    ((CheckBox)ViewUtil.findViewById(this.listview.getChildAt(i), 2131230801)).setChecked(paramBoolean1);
    if (paramCheckBox != null)
      if (!(paramBoolean1))
        break label103;
    for (boolean bool = false; ; bool = true)
    {
      paramCheckBox.setChecked(bool);
      ++i;
      label103: break label8:
    }
  }

  protected void mediaDel()
  {
    ((CommonActivity)OperationManager.operationMap.get(OperationManager.operationTaker)).status = 2;
    Iterator localIterator = OperationManager.operationTaker.getOperationTargets().iterator();
    while (true)
    {
      if (!(localIterator.hasNext()))
        return;
      String str = FileUtil.getRealExtension(((FileInfo)localIterator.next()).getName());
      MimeTypeMap.getSingleton().getMimeTypeFromExtension(str.toLowerCase());
      if (CountActivity.categoryActivity.navTool.isAtTop())
        continue;
      CountActivity.categoryActivity.refresh();
    }
  }

  protected abstract boolean navigate(MenuItem paramMenuItem);

  public void navigationBarSetup(int paramInt1, int paramInt2, NavigationNode paramNavigationNode)
  {
    setNavigationPosAndNode(paramInt1, paramInt2, paramNavigationNode);
    this.sdcardPathBtn.setText(getNavBarWholeShowText());
  }

  public void onAttachedToWindow()
  {
    getWindow().setType(2004);
    super.onAttachedToWindow();
  }

  public void onClick(View paramView)
  {
    switch (paramView.getId())
    {
    default:
      return;
    case 2131230829:
      send();
      return;
    case 2131230831:
      selectAllOrNot();
      this.listview.requestLayout();
      return;
    case 2131230822:
      OperationManager.operationTaker = this.operationUtil;
      SDcardChecker.setCommonActivity(this);
      this.operationUtil.invokeOperation(2, this);
      OperationUtil.mOperationState = Integer.valueOf(2);
      return;
    case 2131230826:
      OperationManager.operationTaker = this.operationUtil;
      cutOrCopy(0);
      return;
    case 2131230824:
      OperationManager.operationTaker = this.operationUtil;
      cutOrCopy(1);
      return;
    case 2131230814:
      SDcardChecker.setCommonActivity(this);
      paste();
      this.mStateCheckBoxVisible = true;
      return;
    case 2131230816:
    }
    pasteCancel();
  }

  public boolean onContextItemSelected(MenuItem paramMenuItem)
  {
    Object localObject;
    AdapterView.AdapterContextMenuInfo localAdapterContextMenuInfo = (AdapterView.AdapterContextMenuInfo)paramMenuItem.getMenuInfo();
    if (paramMenuItem.getGroupId() == 18)
      switch (paramMenuItem.getItemId())
      {
      default:
      case 19:
      case 20:
      case 21:
      }
    do
    {
      boolean bool = this.contextMenuView instanceof ListView;
      localObject = null;
      if (bool)
      {
        FileInfo localFileInfo = (FileInfo)((ThumbnailAdapter)this.listview.getAdapter()).getItem(localAdapterContextMenuInfo.position);
        localObject = localFileInfo;
        this.operatedfile = localFileInfo;
      }
      if (this.listview.getAdapter() != null)
        break label331;
      return false;
      RingtoneUtil.setVoice(this.context, this.operatedfile.path, 2);
      Toast.makeText(this.context, 2131034246, 0).show();
      return true;
      RingtoneUtil.setVoice(this.context, this.operatedfile.path, 1);
      Toast.makeText(this.context, 2131034246, 0).show();
      return true;
      RingtoneUtil.setVoice(this.context, this.operatedfile.path, 0);
      Toast.makeText(this.context, 2131034246, 0).show();
      return true;
    }
    while (paramMenuItem.getGroupId() != 29);
    int i = paramMenuItem.getItemId();
    String str = null;
    switch (i)
    {
    default:
    case 30:
    case 31:
    case 32:
    case 33:
    case 34:
    case 35:
    }
    while (true)
    {
      OperationUtil.openFile(this.operatedfile.path, this, str);
      return true;
      str = "image/*";
      continue;
      str = "audio/*";
      continue;
      str = "video/*";
      continue;
      str = "text/*";
      continue;
      str = "application/vnd.shortcut.package-archive";
      continue;
      str = "application/*";
    }
    if ((paramMenuItem.getItemId() > 99) && (paramMenuItem.getItemId() < -1 + 100 + this.navTool.navEntity.size()))
    {
      label331: navigate(paramMenuItem);
      return true;
    }
    switch (paramMenuItem.getItemId())
    {
    default:
      return false;
    case 16:
      OperationManager.operationTaker = this.operationUtil;
      OperationUtil.dataClear();
      this.operationUtil.addOperationTarget(localObject);
      swithToPrivacyActivity();
      return true;
    case 10:
      OperationUtil.mOperationState = Integer.valueOf(1);
      OperationManager.operationTaker = this.operationUtil;
      this.operationUtil.addOperationTarget(localObject);
      cutOrCopy(0);
      return true;
    case 36:
      SearchActivity.jumpto(new FileInfo(this.operatedfile.getFile().getParentFile(), this.context), this.operatedfile, this, OperationUtil.mOperationState.intValue());
      return true;
    case 11:
      OperationUtil.mOperationState = Integer.valueOf(1);
      OperationManager.operationTaker = this.operationUtil;
      this.operationUtil.addOperationTarget(localObject);
      cutOrCopy(1);
      return true;
    case 7:
      OperationManager.operationTaker = this.operationUtil;
      showDialog(4);
      return true;
    case 6:
      OperationManager.operationTaker = this.operationUtil;
      this.operationUtil.addOperationTarget(localObject);
      this.operationUtil.invokeOperation(2, this);
      OperationUtil.mOperationState = Integer.valueOf(2);
      return true;
    case 12:
      OperationManager.operationTaker = this.operationUtil;
      showDialog(5);
      return true;
    case 8:
      this.operationUtil.addOperationTarget(localObject);
      this.operationUtil.multipleSend(this);
      return true;
    case 17:
    }
    doInstall();
    return true;
  }

  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    getWindow().setFlags(2048, 2048);
    if (SDcardChecker.srcardStateResolve(true, this))
      return;
    requestWindowFeature(1);
    this.context = this;
    setSort();
    new Thread(new Runnable()
    {
      public void run()
      {
        SelectedIndicator.clearState.put(CommonActivity.this.context.getClass(), null);
        CommonActivity.this.initListViewSelector();
        CommonActivity.this.setHiddenFileShowFlag();
      }
    }).start();
  }

  public void onCreateContextMenu(ContextMenu paramContextMenu, View paramView, ContextMenu.ContextMenuInfo paramContextMenuInfo)
  {
    this.thismenu = paramContextMenu;
    this.thismenuInfo = paramContextMenuInfo;
    Logs.i("------------------" + paramContextMenu.size() + " " + paramContextMenuInfo);
    this.contextMenuView = paramView;
    switch (paramView.getId())
    {
    default:
    case 2131230811:
      do
      {
        do
          return;
        while (OperationUtil.mOperationState.intValue() == 1);
        if (!(this.adapter.hasSelected()))
          break label125;
      }
      while (this.pasteToolbar.getVisibility() == 0);
      paramView.performClick();
      return;
      fileListContextMenux(paramContextMenu, paramContextMenuInfo);
      return;
    case 2131230852:
      label125: sdcardPathBtnContextMenux(paramContextMenu, paramContextMenuInfo);
      return;
    case 2131230835:
    }
    showApkViewContextMenux(paramContextMenu, paramContextMenuInfo);
  }

  protected Dialog onCreateDialog(int paramInt)
  {
    switch (paramInt)
    {
    case 2:
    case 10:
    case 11:
    case 12:
    case 13:
    case 14:
    case 15:
    default:
      return super.onCreateDialog(paramInt);
    case 1:
      ViewGroup localViewGroup2 = (ViewGroup)LayoutInflater.from(this).inflate(2130903050, null);
      EditText localEditText2 = (EditText)localViewGroup2.findViewById(2131230795);
      localEditText2.setText(2131034133);
      Selection.setSelection(new SpannableString(getString(2131034133)), 0, 4);
      this.operatingDialog = new AlertDialog(this)
      {
        public void onAttachedToWindow()
        {
          super.onAttachedToWindow();
        }
      };
      this.operatingDialog.setIcon(17301543);
      this.operatingDialog.setTitle(2131034143);
      this.operatingDialog.setView(localViewGroup2);
      this.operatingDialog.setButton(getString(17039370), new DialogInterface.OnClickListener(localEditText2)
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          File localFile = CommonActivity.this.createNewFolder(this.val$et.getText().toString());
          if (localFile == null)
            return;
          CommonActivity.this.getApplicationContext().getContentResolver().insert(MediaArgs.dirUri, ContentValuesUtil.constructContentValues(localFile, ""));
        }
      });
      this.operatingDialog.setButton2(getString(17039360), new CancelClicker(this));
      return this.operatingDialog;
    case 6:
      ViewGroup localViewGroup1 = (ViewGroup)LayoutInflater.from(this).inflate(2130903045, null);
      return new AlertDialog.Builder(this).setTitle(getString(2131034275)).setView(localViewGroup1).setCancelable(false).setNeutralButton(2131034264, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          paramDialogInterface.cancel();
          ((AlertDialog)paramDialogInterface).findViewById(2131230762).setVisibility(8);
          paramDialogInterface.dismiss();
        }
      }).create();
    case 3:
      AlertDialog.Builder localBuilder = new AlertDialog.Builder(this);
      Object[] arrayOfObject = new Object[1];
      arrayOfObject[0] = this.operatedfile.getName();
      return localBuilder.setTitle(getString(2131034124, arrayOfObject)).setIcon(17301543).setPositiveButton(17039370, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          CommonActivity.this.operationUtil.recursiveDelete(new File(CommonActivity.this.operatedfile.getPath()));
        }
      }).setNegativeButton(17039360, new CancelClicker(this)).create();
    case 4:
      View localView6 = LayoutInflater.from(this).inflate(2130903050, null);
      EditText localEditText1 = (EditText)localView6.findViewById(2131230795);
      return new AlertDialog.Builder(this).setTitle(2131034135).setView(localView6).setPositiveButton(17039370, new DialogInterface.OnClickListener(localEditText1)
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          String str;
          Boolean localBoolean;
          if (this.val$et2.getText().toString().trim().equals(""))
            Toast.makeText(CommonActivity.this.context, 2131034207, 0).show();
          do
          {
            return;
            str = this.val$et2.getText().toString().trim();
            localBoolean = OperationUtil.renameFileOrFolder(new File(CommonActivity.this.operatedfile.getPath()), str, CommonActivity.this.context);
          }
          while (localBoolean == null);
          if (!(localBoolean.booleanValue()))
          {
            Toast.makeText(CommonActivity.this.context, 2131034208, 1).show();
            return;
          }
          FileInfo localFileInfo = new FileInfo(new File(FileUtil.getParent(CommonActivity.this.operatedfile.getPath()) + "/" + str), PathActivity.activityInstance);
          localFileInfo.buildName();
          CommonActivity.this.post_rename(CommonActivity.this.operatedfile, localFileInfo, localBoolean, CommonActivity.this.context);
        }
      }).setNegativeButton(17039360, new CancelClicker(this)).create();
    case 5:
      View localView5 = LayoutInflater.from(this).inflate(2130903048, null);
      return new AlertDialog.Builder(this).setTitle(2131034140).setView(localView5).setNeutralButton(2131034264, new CancelClicker(this)).create();
    case 8:
      View localView4 = LayoutInflater.from(this).inflate(2130903051, null);
      localView4.findViewById(2131230796).setOnClickListener(this);
      localView4.findViewById(2131230796).setOnTouchListener(this.touchEffectListner);
      localView4.findViewById(2131230797).setOnClickListener(this);
      localView4.findViewById(2131230797).setOnTouchListener(this.touchEffectListner);
      localView4.findViewById(2131230798).setOnClickListener(this);
      localView4.findViewById(2131230798).setOnTouchListener(this.touchEffectListner);
      if (!(Config.isLewaRom))
      {
        ((TextView)localView4.findViewById(2131230796)).setTextColor(-1);
        ((TextView)localView4.findViewById(2131230797)).setTextColor(-1);
        ((TextView)localView4.findViewById(2131230798)).setTextColor(-1);
      }
      this.installDialog = new AlertDialog.Builder(this).setTitle(2131034272).setView(localView4).create();
      return this.installDialog;
    case 9:
      return createReportDialog(new CancelClicker(this)
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          PackageInstallManager.getInstance().clear();
          PackageInstallManager.getInstance().clearHistory();
          PackageInstallManager.getInstance().pi.clear();
          PackageInstallManager.toInstallPaths.clear();
          OperationUtil.selectedEntities.clear();
          super.onClick(paramDialogInterface, paramInt);
        }
      });
    case 7:
      View localView3 = LayoutInflater.from(this).inflate(2130903049, null);
      return new AlertDialog.Builder(this).setTitle(2131034282).setView(localView3).setPositiveButton(17039370, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          String str = ((EditText)((AlertDialog)paramDialogInterface).findViewById(2131230792)).getText().toString();
          Logs.i("--------- sKsize " + str);
          Object localObject = Float.valueOf(0.0F);
          try
          {
            Float localFloat = Float.valueOf(Float.parseFloat(str));
            localObject = localFloat;
            if (localObject != Config.image_filter_size)
            {
              SPUtil.putValue(CommonActivity.this.context, "SP_IMAGE_FILTER_SIZE", "KEY_IMAGE_FILTER_SIZE", Float.valueOf(((Float)localObject).floatValue()));
              Config.image_filter_size = (Float)localObject;
            }
            CommonActivity.this.refresh();
            return;
          }
          catch (Exception localException)
          {
            localException.printStackTrace();
          }
        }
      }).setNegativeButton(17039360, new CancelClicker(this)).create();
    case 16:
      View localView2 = LayoutInflater.from(getContext()).inflate(2130903047, null);
      AlertDialog localAlertDialog2 = new AlertDialog.Builder(this).setView(localView2).create();
      localView2.findViewById(2131230771).setOnClickListener(new View.OnClickListener(localAlertDialog2)
      {
        public void onClick(View paramView)
        {
          try
          {
            CommonActivity.this.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("market://details?id=com.lewa.app.filemanager")));
            this.val$dialog.cancel();
            this.val$dialog.dismiss();
            return;
          }
          catch (Exception localException)
          {
            Intent localIntent = new Intent();
            localIntent.setAction("shortcut.intent.action.VIEW");
            localIntent.setData(Uri.parse("http://zhushou.360.cn/detail/index/soft_id/178592"));
            CommonActivity.this.startActivity(localIntent);
          }
        }
      });
      return localAlertDialog2;
    case 17:
    }
    View localView1 = LayoutInflater.from(getContext()).inflate(2130903047, null);
    AlertDialog localAlertDialog1 = new AlertDialog.Builder(this).setView(localView1).create();
    ((TextView)localView1.findViewById(2131230771)).setText(2131034309);
    localView1.findViewById(2131230771).setOnClickListener(new View.OnClickListener(localAlertDialog1)
    {
      public void onClick(View paramView)
      {
        try
        {
          CommonActivity.this.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("market://details?id=com.lewa.app.filemanager")));
          this.val$pvDialog.cancel();
          this.val$pvDialog.dismiss();
          return;
        }
        catch (Exception localException1)
        {
          try
          {
            Intent localIntent = new Intent();
            localIntent.setAction("shortcut.intent.action.VIEW");
            localIntent.setData(Uri.parse("http://zhushou.360.cn/detail/index/soft_id/178592"));
            CommonActivity.this.startActivity(localIntent);
          }
          catch (Exception localException2)
          {
          }
        }
      }
    });
    ((TextView)localView1.findViewById(2131230770)).setText(2131034310);
    return localAlertDialog1;
  }

  public boolean onCreateOptionsMenu(Menu paramMenu)
  {
    super.onCreateOptionsMenu(paramMenu);
    paramMenu.clear();
    getMenuInflater().inflate(2131165184, paramMenu);
    setMenuItemById(paramMenu.findItem(2131230900).getSubMenu(), paramMenu.findItem(2131230900).getSubMenu().size());
    return true;
  }

  protected void onDestroy()
  {
    super.onDestroy();
    if (this.renameWaitDialog != null)
    {
      this.renameWaitDialog.dismiss();
      this.renameWaitDialog = null;
    }
    if (OperationUtil.operatingDialog == null)
      return;
    OperationUtil.operatingDialog.dismiss();
    OperationUtil.operatingDialog = null;
  }

  public boolean onKeyDown(int paramInt, KeyEvent paramKeyEvent)
  {
    boolean bool2;
    boolean bool1 = true;
    StringBuilder localStringBuilder = new StringBuilder("-----------KEYCODE_HOME ");
    if (paramInt == 3)
    {
      bool2 = bool1;
      label22: Logs.i(bool2);
      if (paramInt != 84)
        break label80;
      Intent localIntent1 = new Intent(this, SearchActivity.class);
      localIntent1.putExtra("isNew", bool1);
      startActivity(localIntent1);
      bool1 = false;
    }
    do
    {
      return bool1;
      bool2 = false;
      break label22:
      if (paramInt == 3)
      {
        if (RuntimeArg.isInInstall)
          label80: FileApp.slideActivity.endJob();
        Intent localIntent2 = new Intent();
        localIntent2.setAction("android.intent.action.MAIN");
        localIntent2.addCategory("android.intent.category.DEFAULT");
        localIntent2.addCategory("android.intent.category.HOME");
        startActivity(localIntent2);
        return super.onKeyDown(paramInt, paramKeyEvent);
      }
      if (paramInt != 4)
        break label363;
      Logs.i("----------- action_flag " + this + " " + this.navTool.isAtTop());
      if ((this.action_flag != null) && (this.navTool.isAtTop()))
      {
        ActivityPool.getInstance().exit();
        return bool1;
      }
      if ((this.pasteToolbar != null) && (this.pasteToolbar.getVisibility() == 0))
      {
        if (this.navTool.isAtTop())
        {
          pasteCancel();
          return bool1;
        }
        backward();
        return bool1;
      }
      if ((this.bottomToolbar != null) && (this.bottomToolbar.getVisibility() == 0))
      {
        makeSelectAll(false, bool1);
        showBottomBar(8);
        this.listview.requestLayout();
        OperationUtil.mOperationState = Integer.valueOf(2);
        return bool1;
      }
      if ((this.installDialog != null) && (this.installDialog.isShowing()))
      {
        doAfterInstall();
        return bool1;
      }
      if (super.getClass() == SearchActivity.class)
      {
        finish();
        return bool1;
      }
      Logs.i("------------ 11 ");
    }
    while ((SDcardChecker.isSDCardAvailable()) && (backward()));
    ActivityPool.getInstance().exit();
    return bool1;
    if (paramInt == 82)
    {
      label363: openOptionsMenu();
      return bool1;
    }
    return false;
  }

  public boolean onMenuItemClick(MenuItem paramMenuItem)
  {
    if (this.policy == null)
      return false;
    int i = -1;
    int j = -1;
    switch (paramMenuItem.getItemId())
    {
    default:
    case 2131230902:
    case 2131230903:
    case 2131230904:
    case 2131230905:
    }
    while (true)
    {
      paramMenuItem.setChecked(true);
      this.policy.setSeq(j);
      this.policy.setPolicy(i);
      sort();
      showBottomBar(8);
      showPasteToolBar(8);
      return false;
      j = 0;
      i = 0;
      continue;
      i = 2;
      j = 0;
      continue;
      i = 1;
      j = 1;
      continue;
      i = 3;
      j = 0;
    }
  }

  public boolean onOptionsItemSelected(MenuItem paramMenuItem)
  {
    switch (paramMenuItem.getItemId())
    {
    default:
      sort();
      return super.onOptionsItemSelected(paramMenuItem);
    case 2131230900:
      return super.onOptionsItemSelected(paramMenuItem);
    case 2131230906:
      showDialog(1);
      return true;
    case 2131230907:
      refresh(true);
      showBottomBar(8);
      showPasteToolBar(8);
      return true;
    case 23:
      boolean bool = Config.SDCARD_HIDE_OPTION;
      int i = 0;
      if (bool);
      while (true)
      {
        Config.SDCARD_HIDE_OPTION = i;
        refresh();
        return true;
        i = 1;
      }
    case 22:
      EmptyDirectoryCleaner.clearCleanData();
      if (this.reportAdapter != null)
        this.reportAdapter.notifyDataSetChanged();
      if (EmptyDirectoryCleaner.cleanSatrt)
      {
        Toast.makeText(getContext(), 2131034297, 1).show();
        return true;
      }
      Toast.makeText(this.context, 2131034274, 0).show();
      EmptyDirectoryCleaner.cleanSatrt = true;
      new HandlerThread("", 10)
      {
        public void run()
        {
          int i = -1;
          if (i == EmptyDirectoryCleaner.getCleanedCount())
          {
            label2: EmptyDirectoryCleaner.cleanSatrt = false;
            CommonActivity.this.handler.sendEmptyMessage(9);
            if (EmptyDirectoryCleaner.getCleanedCount() == 0)
              return;
          }
          else
          {
            Logs.i("= i " + i + " " + EmptyDirectoryCleaner.getCleanedCount());
            i = EmptyDirectoryCleaner.getCleanedCount();
            if (CommonActivity.this.context.getClass() == PathActivity.class);
            for (String str = ((FileInfo)((NavigationNode)CommonActivity.this.navTool.navEntity.peek()).producingSource).path; ; str = "/mnt/sdcard")
            {
              File localFile = new File(str);
              Integer[] arrayOfInteger = new Integer[1];
              arrayOfInteger[0] = Integer.valueOf(4);
              localFile.listFiles(new EmptyDirectoryCleaner(arrayOfInteger, Constants.HIDDEN_EXCLUDED, Constants.HIDDEN_INCLUDED));
              break label2:
            }
          }
          Iterator localIterator = EmptyDirectoryCleaner.cleanedEntities.iterator();
          while (true)
          {
            if (localIterator.hasNext());
            DatasrcDelete.recursiveUpdateDel(new FileInfo(((ReportInfo)localIterator.next()).secondline_detail, CommonActivity.this), CommonActivity.this);
          }
        }
      }
      .start();
      return true;
    case 24:
      showDialog(7);
      return true;
    case 2131230908:
    }
    UMFeedbackService.openUmengFeedbackSDK(this);
    return true;
  }

  protected void onPrepareDialog(int paramInt, Dialog paramDialog)
  {
    super.onPrepareDialog(paramInt, paramDialog);
    switch (paramInt)
    {
    case 2:
    case 8:
    default:
    case 1:
    case 6:
    case 3:
    case 4:
    case 9:
    case 5:
    case 7:
    }
    do
    {
      label397: label487: int i;
      int j;
      int i2;
      int i3;
      EditText localEditText2;
      int i4;
      do
        return;
      while (this.navTool.navEntity.isEmpty());
      EditText localEditText3 = (EditText)paramDialog.findViewById(2131230795);
      FileInfo localFileInfo = new FileInfo();
      localFileInfo.setName(getString(2131034133));
      ArrayList localArrayList = new ArrayList();
      Integer[] arrayOfInteger = new Integer[2];
      arrayOfInteger[0] = Integer.valueOf(1);
      arrayOfInteger[1] = Integer.valueOf(Config.getHiddenOption(Config.SDCARD_HIDE_OPTION));
      StrPrefixFilter localStrPrefixFilter = new StrPrefixFilter(arrayOfInteger, Constants.HIDDEN_EXCLUDED, Constants.HIDDEN_INCLUDED, localArrayList, localFileInfo.getName());
      ((FileInfo)((NavigationNode)this.navTool.navEntity.peek()).producingSource).getFile().listFiles(localStrPrefixFilter);
      if (localArrayList.size() == 0);
      for (String str2 = localFileInfo.getName(); ; str2 = localFileInfo.getName() + " (" + (1 + this.operationUtil.tackleNewFolderText(localArrayList, localFileInfo.getName())) + ")")
      {
        localEditText3.setText(str2);
        localEditText3.setSelection(0, localEditText3.getText().length());
        InputMethodUtil.showInput(this, localEditText3);
        return;
      }
      Object[] arrayOfObject2 = new Object[1];
      arrayOfObject2[0] = Integer.valueOf(EmptyDirectoryCleaner.getCleanedCount());
      showReport(paramDialog, getString(2131034276, arrayOfObject2), EmptyDirectoryCleaner.getCleanedCount(), EmptyDirectoryCleaner.cleanedEntities);
      return;
      AlertDialog localAlertDialog = (AlertDialog)paramDialog;
      Object[] arrayOfObject1 = new Object[1];
      arrayOfObject1[0] = this.operatedfile.getName();
      localAlertDialog.setTitle(getString(2131034124, arrayOfObject1));
      return;
      TextView localTextView8 = (TextView)paramDialog.findViewById(2131230794);
      if (this.operatedfile.isDir.booleanValue())
      {
        i3 = 2131034123;
        localTextView8.setText(i3);
        localEditText2 = (EditText)paramDialog.findViewById(2131230795);
        localEditText2.setText(this.operatedfile.getName());
        i4 = localEditText2.getText().toString().lastIndexOf(".");
        if (i4 != -1)
          break label487;
      }
      for (int i5 = localEditText2.getText().length(); ; i5 = i4)
      {
        localEditText2.setSelection(0, i5);
        InputMethodUtil.showInput(this, localEditText2);
        return;
        i3 = 2131034280;
        break label397:
      }
      String str1 = ReportOfInstall.simpleMessage;
      int l = ReportOfInstall.failed.size();
      List localList = ReportOfInstall.failed;
      ListView localListView = (ListView)((AlertDialog)paramDialog).findViewById(2131230765);
      if (this.reportTitleView == null)
      {
        this.reportTitleView = new TextView(this.context);
        i1 = 12;
        if (DensityUtil.getDensity(this.context) != 0)
          break label706;
      }
      for (int i1 = 10; ; i2 = 16)
        do
        {
          this.reportTitleView.setTextSize(DensityUtil.dip2px(this.context, i1));
          this.reportTitleView.setTextColor(-16777216);
          localListView.addHeaderView(this.reportTitleView);
          if (DensityUtil.getDensity(this.context) == 0)
          {
            ((TextView)((AlertDialog)paramDialog).findViewById(2131230761)).setTextSize(DensityUtil.dip2px(this.context, 9.0F));
            if (!(Config.isLewaRom))
              ((TextView)((AlertDialog)paramDialog).findViewById(2131230761)).setTextColor(-1);
          }
          Logs.i("reportCount ---" + l);
          showReport(paramDialog, str1, l, localList);
          NotifyUtil.cancel(FileApp.activity, 0);
          label706: return;
        }
        while (DensityUtil.getDensity(this.context) != 1);
      this.value_artist = ((TextView)paramDialog.findViewById(2131230773));
      this.value_album = ((TextView)paramDialog.findViewById(2131230775));
      this.key_artist = ((TextView)paramDialog.findViewById(2131230772));
      this.key_album = ((TextView)paramDialog.findViewById(2131230774));
      TextView localTextView1 = (TextView)paramDialog.findViewById(2131230777);
      TextView localTextView2 = (TextView)paramDialog.findViewById(2131230779);
      TextView localTextView3 = (TextView)paramDialog.findViewById(2131230781);
      TextView localTextView4 = (TextView)paramDialog.findViewById(2131230783);
      TextView localTextView5 = (TextView)paramDialog.findViewById(2131230785);
      TextView localTextView6 = (TextView)paramDialog.findViewById(2131230787);
      TextView localTextView7 = (TextView)paramDialog.findViewById(2131230789);
      if (!(Config.isLewaRom))
      {
        this.value_artist.setTextColor(-1);
        this.value_album.setTextColor(-1);
        this.key_artist.setTextColor(-1);
        this.key_album.setTextColor(-1);
        localTextView1.setTextColor(-1);
        localTextView2.setTextColor(-1);
        localTextView3.setTextColor(-1);
        localTextView4.setTextColor(-1);
        localTextView5.setTextColor(-1);
        localTextView6.setTextColor(-1);
        localTextView7.setTextColor(-1);
        ((TextView)paramDialog.findViewById(2131230776)).setTextColor(-1);
        ((TextView)paramDialog.findViewById(2131230778)).setTextColor(-1);
        ((TextView)paramDialog.findViewById(2131230780)).setTextColor(-1);
        ((TextView)paramDialog.findViewById(2131230782)).setTextColor(-1);
        ((TextView)paramDialog.findViewById(2131230784)).setTextColor(-1);
        ((TextView)paramDialog.findViewById(2131230786)).setTextColor(-1);
        ((TextView)paramDialog.findViewById(2131230788)).setTextColor(-1);
      }
      File localFile = new File(this.operatedfile.getPath());
      if (localFile.isDirectory())
      {
        localTextView2.setVisibility(8);
        paramDialog.findViewById(2131230778).setVisibility(8);
        label1085: localTextView1.setText(this.operatedfile.getName());
        localTextView3.setText(FileUtil.getParent(this.operatedfile.getPath()));
        localTextView4.setText(this.operatedfile.getLastModified());
        if (!(localFile.canRead()))
          break label1232;
        i = 2131034163;
        label1137: localTextView5.setText(i);
        if (!(localFile.canWrite()))
          break label1240;
        j = 2131034163;
        label1157: localTextView6.setText(j);
        if (!(localFile.isHidden()))
          break label1248;
      }
      for (int k = 2131034163; ; k = 2131034164)
      {
        localTextView7.setText(k);
        paramDialog.findViewById(2131230790).setVisibility(8);
        return;
        paramDialog.findViewById(2131230778).setVisibility(0);
        localTextView2.setVisibility(0);
        localTextView2.setText(this.operatedfile.getSizeText().trim());
        break label1085:
        label1232: i = 2131034164;
        break label1137:
        label1240: j = 2131034164;
        label1248: break label1157:
      }
      EditText localEditText1 = (EditText)paramDialog.findViewById(2131230792);
      Float localFloat = (Float)SPUtil.getValue(this.context, "SP_IMAGE_FILTER_SIZE", "KEY_IMAGE_FILTER_SIZE", Float.class);
      localEditText1.setText(localFloat);
      localEditText1.selectAll();
    }
    while (Config.isLewaRom);
    ((TextView)paramDialog.findViewById(2131230791)).setTextColor(-1);
    ((TextView)paramDialog.findViewById(2131230793)).setTextColor(-1);
  }

  protected void onStart()
  {
    super.onStart();
    Logs.i("", "-------- start" + this);
    this.context = this;
    ActivityPool.getInstance().addActivity(this);
    if (SDcardChecker.srcardStateResolve(true, this))
      return;
    initDialogs();
    initOperation();
    startup();
  }

  public void onWindowFocusChanged(boolean paramBoolean)
  {
    super.onWindowFocusChanged(paramBoolean);
  }

  protected void paste()
  {
    File localFile = ((FileInfo)((NavigationNode)this.navTool.navEntity.peek()).producingSource).getFile();
    Logs.i("--------target " + localFile.getAbsolutePath());
    if (isChildRelation(localFile, this.operationUtil.initPathList(OperationUtil.selectedEntities)))
    {
      showPasteToolBar(8);
      int i = -1;
      if (OperationUtil.getOperType() == 0);
      for (i = 2131034127; ; i = 2131034129)
        do
        {
          this.operationUtil.duplicated.clear();
          OperationUtil.dataClear();
          makeSeenToAll(true);
          Object[] arrayOfObject = new Object[1];
          arrayOfObject[0] = getString(i);
          Toast.makeText(this, getString(2131034174, arrayOfObject), 1).show();
          return;
        }
        while (OperationUtil.getOperType() != 1);
    }
    String str = FileUtil.getPathWithoutFilename(localFile).getAbsolutePath();
    this.operationUtil.setDestination(str);
    this.operationUtil.invokeOperation(this);
    showPasteToolBar(8);
    SearchActivity.markfromPathActivity = false;
  }

  public void pasteCancel()
  {
    showPasteToolBar(8);
    if (CountActivity.categoryActivity != null)
      CountActivity.categoryActivity.makeSeenToAll(true);
    if (SearchActivity.markfromPathActivity)
      startActivity(new Intent(this, SearchActivity.class));
    makeSeenToAll(true);
    ((CommonActivity)OperationManager.operationMap.get(OperationManager.operationTaker)).makeSelectAll(false, true);
    ((CommonActivity)OperationManager.operationMap.get(OperationManager.operationTaker)).makeSeenToAll(true);
    ((CommonActivity)OperationManager.operationMap.get(OperationManager.operationTaker)).showBottomBar(8);
    this.operationUtil.setCommand(-1);
    OperationUtil.dataClear();
    OperationUtil.mOperationState = Integer.valueOf(2);
    OperationUtil.mOperationState = Integer.valueOf(2);
    this.mStateCheckBoxVisible = true;
  }

  protected void post_rename(FileInfo paramFileInfo1, FileInfo paramFileInfo2, Boolean paramBoolean, CommonActivity paramCommonActivity)
  {
    updatePostRename(paramBoolean, paramFileInfo2, paramFileInfo1, paramCommonActivity);
  }

  public String prepareMime()
  {
    return "*/*";
  }

  protected void prepareMusicInfo(int paramInt, FileInfo paramFileInfo)
  {
    if (paramFileInfo.getFile().isFile())
      if (!(((NavigationNode)this.navTool.navEntity.peek()).producingSource.toString().toUpperCase().equals("AUDIO")))
        break label76;
    for (paramInt = 0; ; paramInt = 8)
    {
      this.value_artist.setVisibility(paramInt);
      this.value_album.setVisibility(paramInt);
      this.key_artist.setVisibility(paramInt);
      this.key_album.setVisibility(paramInt);
      label76: return;
    }
  }

  public void reFreshCheckboxVisible()
  {
    int i = 1;
    if (OperationUtil.mOperationState.intValue() != i);
    while (true)
    {
      if ((this.adapter != null) && (this.adapter.isVisible != i))
        makeSeenToAll(i);
      return;
      int j = 0;
    }
  }

  public void recordPageSharedPreference(String paramString)
  {
  }

  public void refresh()
  {
    if (SDcardChecker.srcardStateResolve(true, this));
    do
    {
      return;
      PathActivity.activityInstance.firstTimeStartup();
    }
    while (this.navTool.navEntity.isEmpty());
    access((NavigationNode)this.navTool.navEntity.peek(), -1, true, 2, OperationUtil.mOperationState.intValue());
    reFreshCheckboxVisible();
  }

  public void refresh(boolean paramBoolean)
  {
    if (!(paramBoolean))
      return;
    refresh();
  }

  protected void ringtoneSetup(ContextMenu paramContextMenu)
  {
    Logs.i("", " ringtoneSetup ");
  }

  protected void sdcardPathBtnContextMenux(ContextMenu paramContextMenu, ContextMenu.ContextMenuInfo paramContextMenuInfo)
  {
    paramContextMenu.setHeaderTitle(2131034177);
    Logs.i("", "pass sdcardbutton");
    String str1 = getString(2131034300);
    int i = 0;
    if (i >= this.navTool.navEntity.size())
      label31: return;
    Logs.i("", "sdcardbutton " + i);
    int j = i + 100;
    if (i != -1 + this.navTool.navEntity.size());
    for (String str2 = ((NavigationNode)this.navTool.navEntity.get(i)).displayname; ; str2 = str1)
    {
      paramContextMenu.add(15, j, 0, str2);
      ++i;
      break label31:
    }
  }

  public boolean searchFileInfoInList(List<FileInfo> paramList, FileInfo paramFileInfo, Comparator<FileInfo> paramComparator)
    throws IllegalStateException
  {
    return (Collections.binarySearch(paramList, paramFileInfo, paramComparator) >= 0);
  }

  public void selectAllOrNot()
  {
    boolean bool1 = this.adapter.isSelectAll();
    Logs.i("", "selectOption ====== " + bool1);
    if (bool1);
    for (boolean bool2 = false; ; bool2 = true)
    {
      makeSelectAll(bool2, true);
      selectTextImageChange();
      if ((this.listview.getAdapter() != null) && (bool1))
      {
        showBottomBar(8);
        OperationUtil.mOperationState = Integer.valueOf(2);
      }
      return;
    }
  }

  public void selectTextImageChange()
  {
    boolean bool = this.adapter.isSelectAll();
    TextView localTextView = (TextView)ViewUtil.findViewById(this.bottomToolbar, 2131230833);
    if (bool)
    {
      ((ImageView)this.toolbar_selectAll.findViewById(2131230832)).setImageResource(2130837530);
      localTextView.setText(2131034126);
    }
    while (true)
    {
      this.bottomToolbar.requestLayout();
      return;
      ((ImageView)this.toolbar_selectAll.findViewById(2131230832)).setImageResource(2130837529);
      localTextView.setText(2131034130);
    }
  }

  public void send()
  {
    this.operationUtil.multipleSend(this);
    makeSelectAll(false, true);
  }

  public void sendBack()
  {
    Intent localIntent = new Intent(this.callbackAction);
    localIntent.addCategory("android.intent.category.DEFAULT");
    localIntent.putStringArrayListExtra("PATHS", toPathsInfoUtil(this.operationUtil.getOperationTargets()));
    sendBroadcast(localIntent);
    ActivityPool.getInstance().exit();
  }

  public void setEmptyView(AdapterView paramAdapterView)
  {
    if (getEmptyView() == null)
      return;
    paramAdapterView.setEmptyView(getEmptyView());
    setEmptyViewText(getEmptyText());
  }

  protected void setEmptyViewText(String paramString)
  {
    ((TextView)this.listview.getEmptyView().findViewById(2131230848)).setText(paramString);
  }

  protected abstract void setHiddenFileShowFlag();

  public boolean setLoadThumbnailBeginEnd(AbsListView paramAbsListView, int paramInt)
  {
    int i;
    Integer localInteger2;
    if (paramAbsListView.getChildCount() <= 0)
      return true;
    View localView = paramAbsListView.getChildAt(0);
    if (localView == null)
      return true;
    Integer localInteger1 = (Integer)((ThumbnailAdapter)paramAbsListView.getAdapter()).getViewContentMap().get(localView);
    if (localInteger1 == null)
    {
      i = 0;
      label50: Integer.valueOf(i);
      Integer.valueOf(-1);
      if (paramInt <= -1)
        break label98;
      label66: localInteger2 = Integer.valueOf(paramInt);
      if (localInteger2 != null)
        break label133;
    }
    for (int j = 0; ; j = localInteger2.intValue())
    {
      Integer.valueOf(j);
      return false;
      i = localInteger1.intValue();
      break label50:
      label98: paramInt = ((Integer)((ThumbnailAdapter)paramAbsListView.getAdapter()).getViewContentMap().get(paramAbsListView.getChildAt(-1 + paramAbsListView.getChildCount()))).intValue();
      label133: break label66:
    }
  }

  public void setMenuItem(Menu paramMenu, int paramInt)
  {
    paramMenu.getItem(paramInt).setOnMenuItemClickListener(this);
  }

  public void setMenuItemById(Menu paramMenu, int paramInt)
  {
    for (int i = 0; ; ++i)
    {
      if (i >= paramInt)
        return;
      setMenuItem(paramMenu, i);
    }
  }

  protected abstract void setNavigationPosAndNode(int paramInt1, int paramInt2, NavigationNode paramNavigationNode);

  public void setPageView(View paramView)
  {
    this.list = paramView;
  }

  protected void setSort()
  {
    this.policy = new ObjectSort(0, 0);
  }

  public void setupAfterUILoad(int paramInt1, NavigationNode paramNavigationNode, int paramInt2, int paramInt3, List<FileInfo> paramList)
  {
    if ((hasToOperatingOption()) && (paramInt1 == 1))
      showBottomBar(8);
    while (true)
    {
      if ((paramInt3 == 0) && (this.adapter != null))
        this.adapter.markVisible(true);
      if (paramInt3 == 2)
        this.listview.setSelection(paramInt2);
      makeSelectAll(false, false);
      reFreshCheckboxVisible();
      return;
      if ((SlideActivity.paramActivity.isInOperation != -1) || (OperationUtil.getOperType() == 0) || (OperationUtil.getOperType() == 1))
        continue;
      OperationUtil.dataClear();
    }
  }

  public List<FileInfo> setupPrevUILoad()
  {
    if ((this.adapter == null) || (this.adapter.getItemDataSrc() == null))
      return null;
    return ((List)this.adapter.getItemDataSrc().getContent());
  }

  protected void showApkViewContextMenux(ContextMenu paramContextMenu, ContextMenu.ContextMenuInfo paramContextMenuInfo)
  {
  }

  public void showBackBar()
  {
    if (this.action_flag != null)
      return;
  }

  public void showBottomBar(int paramInt)
  {
    TextView localTextView;
    if (this.bottomToolbar != null)
      this.bottomToolbar.setVisibility(paramInt);
    if ((paramInt == 0) && (this.toolbar_selectAll != null))
    {
      localTextView = (TextView)this.toolbar_selectAll.findViewById(2131230833);
      if (localTextView != null)
        break label45;
    }
    return;
    label45: localTextView.setText(2131034130);
  }

  protected void showInstallMenu(ContextMenu paramContextMenu, ContextMenu.ContextMenuInfo paramContextMenuInfo)
  {
    paramContextMenu.add(0, 26, 0, 2131034268);
    paramContextMenu.add(0, 25, 0, 2131034269);
    paramContextMenu.add(0, 27, 0, 2131034270);
  }

  protected void showPasteToolBar(int paramInt)
  {
    this.pasteToolbar.setVisibility(paramInt);
  }

  public void showReport(Dialog paramDialog, String paramString, int paramInt, Collection<ReportInfo> paramCollection)
  {
    if (this.reportAdapter == null)
    {
      this.reportAdapter = new ColorInterchangedAdapter(this, getCleanAdaptInfo());
      ((ListView)((AlertDialog)paramDialog).findViewById(2131230765)).setAdapter(this.reportAdapter);
    }
    this.reportAdapter.notifyDataSetChanged();
    ((TextView)paramDialog.findViewById(2131230761)).setText(paramString);
    if (!(Config.isLewaRom))
      ((TextView)paramDialog.findViewById(2131230761)).setTextColor(-1);
    ((AlertDialog)paramDialog).findViewById(2131230763).setVisibility(8);
    ((Button)paramDialog.findViewById(2131230762)).setVisibility(8);
    paramDialog.findViewById(2131230764).setVisibility(8);
    if (paramInt == 0)
    {
      ((Button)paramDialog.findViewById(2131230762)).setVisibility(8);
      return;
    }
    ((Button)paramDialog.findViewById(2131230762)).setText(2131034277);
    ((Button)paramDialog.findViewById(2131230762)).setVisibility(0);
    ((Button)paramDialog.findViewById(2131230762)).setOnClickListener(new View.OnClickListener(paramDialog, paramCollection)
    {
      boolean reportListShowed;

      public void onClick(View paramView)
      {
        Button localButton = (Button)((AlertDialog)this.val$cleandialog).findViewById(2131230762);
        LinearLayout localLinearLayout = (LinearLayout)((AlertDialog)this.val$cleandialog).findViewById(2131230764);
        View localView = ((AlertDialog)this.val$cleandialog).findViewById(2131230763);
        if (!(this.reportListShowed))
        {
          this.reportListShowed = true;
          localView.setVisibility(0);
          localView.requestLayout();
          localButton.setText(2131034278);
          ArrayList localArrayList = new ArrayList();
          localArrayList.addAll(this.val$reportInfos);
          CommonActivity.this.reportAdapter.setItemDataSrc(new ItemDataSrc(localArrayList));
          CommonActivity.this.reportAdapter.notifyDataSetChanged();
          localLinearLayout.setVisibility(0);
          return;
        }
        this.reportListShowed = false;
        localButton.setText(2131034277);
        localLinearLayout.setVisibility(8);
        localView.setVisibility(8);
      }
    });
  }

  public Boolean singleChoiceInsertion(View paramView, Integer paramInteger, FileInfo paramFileInfo, boolean paramBoolean)
  {
    if (this.action_flag == null)
      return Boolean.valueOf(true);
    CheckBox localCheckBox = (CheckBox)paramView;
    if ((paramFileInfo.isDir.booleanValue()) && (paramBoolean))
    {
      localCheckBox.setChecked(false);
      return null;
    }
    if (this.isChoiceModeMultiple == null)
      return Boolean.valueOf(true);
    if (!(this.isChoiceModeMultiple.booleanValue()))
    {
      if (!(((CheckBox)paramView).isChecked()))
        localCheckBox = null;
      makeSelectAll(false, true, localCheckBox, paramInteger);
    }
    return Boolean.valueOf(false);
  }

  public abstract void sort();

  public abstract void startup();

  protected abstract void swithToPrivacyActivity();

  public ArrayList<String> toPathsInfoUtil(List<FileInfo> paramList)
  {
    ArrayList localArrayList = new ArrayList(0);
    Iterator localIterator = paramList.iterator();
    while (true)
    {
      if (!(localIterator.hasNext()))
        return localArrayList;
      localArrayList.add(((FileInfo)localIterator.next()).getPath());
    }
  }

  public void treatBottmBar()
  {
    treatBottmBar(this.adapter);
  }

  public void treatBottmBar(ThumbnailAdapter paramThumbnailAdapter)
  {
    if (paramThumbnailAdapter.isSelected().booleanValue())
    {
      showBottomBar(0);
      SelectedIndicator.clearOthersSelectionState(this.context);
      SelectedIndicator.putSelected(this.context);
      return;
    }
    showBottomBar(8);
  }

  protected void turnToFileBrowsing(MapAdapter.ActionListener[] paramArrayOfActionListener, AdapterView.OnItemClickListener paramOnItemClickListener, NavigationNode paramNavigationNode)
  {
    turnToFileBrowsing(paramArrayOfActionListener, paramOnItemClickListener, paramNavigationNode, -1);
  }

  protected void turnToFileBrowsing(MapAdapter.ActionListener[] paramArrayOfActionListener, AdapterView.OnItemClickListener paramOnItemClickListener, NavigationNode paramNavigationNode, int paramInt)
  {
    try
    {
      access(paramNavigationNode, paramNavigationNode.defaultPosition, false, 0, OperationUtil.mOperationState.intValue(), paramInt);
      return;
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }

  protected void updateCountActivity(FileInfo paramFileInfo)
  {
  }

  public void updateDelOnCategory()
  {
    Iterator localIterator = OperationUtil.operMatcher.keySet().iterator();
    while (true)
    {
      if (!(localIterator.hasNext()))
      {
        refreshCountActivity();
        PathActivity.activityInstance.refresh();
        if (this instanceof SearchActivity)
          ((SearchActivity)this).loadFileCursor().dataChanged(new Object[0]);
        return;
      }
      DatasrcDelete.recursiveUpdateDel((FileInfo)localIterator.next(), this);
    }
  }

  public void updateDelOnCategory4Privacy()
  {
    Iterator localIterator = OperationUtil.operMatcher.keySet().iterator();
    while (true)
    {
      if (!(localIterator.hasNext()))
        return;
      DatasrcDelete.recursiveUpdateDel((FileInfo)localIterator.next(), this);
    }
  }

  public boolean updatePostRename(Boolean paramBoolean, FileInfo paramFileInfo1, FileInfo paramFileInfo2, CommonActivity paramCommonActivity)
    throws NumberFormatException
  {
    if (paramBoolean == null)
      return true;
    paramFileInfo2.buildFile();
    DatasrcRename.invokeUpdate(paramFileInfo1, paramFileInfo2, paramCommonActivity, paramFileInfo2.getIsDir().booleanValue());
    ActivityPool localActivityPool = ActivityPool.getInstance();
    if (paramCommonActivity instanceof PathActivity)
      paramCommonActivity = null;
    localActivityPool.refresh(paramCommonActivity);
    return false;
  }

  protected class ListItemClickListener
    implements AdapterView.OnItemClickListener
  {
    public void onItemClick(AdapterView<?> paramAdapterView, View paramView, int paramInt, long paramLong)
    {
      FileInfo localFileInfo = (FileInfo)paramAdapterView.getItemAtPosition(paramInt);
      if ((((ThumbnailAdapter)paramAdapterView.getAdapter()).hasSelected()) && (OperationUtil.mOperationState.intValue() != 1))
      {
        Logs.i("", "=============== (((FileAdapter) parent.getAdapter()).selectedNum " + ((ThumbnailAdapter)paramAdapterView.getAdapter()).selectedNum);
        ((CheckBox)ViewUtil.findViewById(paramView, 2131230801)).performClick();
        CommonActivity.this.treatBottmBar((ThumbnailAdapter)paramAdapterView.getAdapter());
      }
      do
      {
        return;
        CommonActivity.this.enterDir(localFileInfo);
      }
      while (localFileInfo.getIsDir().booleanValue());
      if (!(localFileInfo.getFile().exists()))
      {
        CommonActivity.this.updateCountActivity(localFileInfo);
        return;
      }
      if ((CommonActivity.this.context.getClass() != SearchActivity.class) && (((FileInfoUtil.isFileType(localFileInfo) == FileInfoUtil.FileType.Apk) || (FileInfoUtil.isFileType(localFileInfo) == FileInfoUtil.FileType.Lwt))))
        CommonActivity.this.recordPageSharedPreference(((NavigationNode)CommonActivity.this.navTool.navEntity.peek()).producingSource.toString());
      OperationUtil.openFile(localFileInfo.path, CommonActivity.this.context, null);
    }
  }
}

/* Location:           H:\360云盘\lewa_explorer_3.0\bin\FileApp_orig_dex2jar.jar
 * Qualified Name:     com.direction.hold.ui.CommonActivity
 * JD-Core Version:    0.5.2
 */